<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-11 14:15:27 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>git prune</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#Git">
                                Git                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="db1ff18aaaa48f6a90a4b5fe03b93c6fe69720caf21ad6189c5c7086a5ff5a12/ce" data-source="git-prune" onmousemove="i18n(this)">git-prune</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="bd3d79af66d978c463e426694e6852eb7e7aa14cfbfb8e9d931cf8d59bc1a623/cb" data-source="git-prune - Prune all unreachable objects from the object database" onmousemove="i18n(this)">git-prune &mdash; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &vcy;&scy;&iecy; &ncy;&iecy;&dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy; &icy;&zcy; &bcy;&acy;&zcy;&ycy; &dcy;&acy;&ncy;&ncy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <div> <pre class="hljs language-css">git prune <span class="hljs-selector-attr">[-n]</span> <span class="hljs-selector-attr">[-v]</span> <span class="hljs-selector-attr">[--progress]</span> <span class="hljs-selector-attr">[--expire &lt;time&gt;]</span> <span class="hljs-selector-attr">[--]</span> <span class="hljs-selector-attr">[&lt;head&gt;&hellip;&ZeroWidthSpace;]</span></pre> </div> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="950b509b5e2428a8a17f5c40f9cab25ad7e13cd1a63b145f03527f50af7af1a1/9a" data-source="In most cases, users should run &lt;em&gt;git gc&lt;/em&gt;, which calls &lt;em&gt;git prune&lt;/em&gt;. See the section &amp;quot;NOTES&amp;quot;, below." onmousemove="i18n(this)">&Vcy; &bcy;&ocy;&lcy;&softcy;&shcy;&icy;&ncy;&scy;&tcy;&vcy;&iecy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;&vcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yacy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&tcy;&softcy;  git  gc, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&ycy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &scy;&ocy;&kcy;&rcy;&acy;&shchcy;&iecy;&ncy;&icy;&iecy;  git . &Scy;&mcy;. &rcy;&acy;&zcy;&dcy;&iecy;&lcy;  &quot;NOTES&quot;  &ncy;&icy;&zhcy;&iecy;.</span></td> </tr> </table></div> </div> <p><span data-i18n="572c03fdfef4b413b1be2082784adb0894473b1c55df6a9fde0c7352241535cd/44" data-source="This runs &lt;code&gt;git fsck --unreachable&lt;/code&gt; using all the refs available in &lt;code&gt;refs/&lt;/code&gt;, optionally with an additional set of objects specified on the command line, and prunes all unpacked objects unreachable from any of these head objects from the object database. In addition, it prunes the unpacked objects that are also found in packs by running &lt;code&gt;git prune-packed&lt;/code&gt;. It also removes entries from .git/shallow that are not reachable by any ref." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &ecy;&tcy;&ocy;&mcy;  <code>git fsck --unreachable</code>  &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy;&scy;&yacy; &scy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;&mcy; &vcy;&scy;&iecy;&khcy; &scy;&scy;&ycy;&lcy;&ocy;&kcy;, &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&khcy; &vcy;  <code>refs/</code>  , &pcy;&rcy;&icy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &scy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&mcy; &ncy;&acy;&bcy;&ocy;&rcy;&ocy;&mcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;, &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ycy;&mcy; &vcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&iecy;, &icy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy; &vcy;&scy;&iecy; &rcy;&acy;&scy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;, &ncy;&iecy;&dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&iecy; &dcy;&lcy;&yacy; &lcy;&yucy;&bcy;&ocy;&gcy;&ocy; &icy;&zcy; &ecy;&tcy;&icy;&khcy; &gcy;&ocy;&lcy;&ocy;&vcy;&ncy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &icy;&zcy; &bcy;&acy;&zcy;&ycy; &dcy;&acy;&ncy;&ncy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;. &Kcy;&rcy;&ocy;&mcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &ocy;&ncy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy; &rcy;&acy;&scy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &tcy;&acy;&kcy;&zhcy;&iecy; &ncy;&acy;&khcy;&ocy;&dcy;&yacy;&tcy;&scy;&yacy; &vcy; &pcy;&acy;&kcy;&iecy;&tcy;&acy;&khcy;, &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&vcy;  <code>git prune-packed</code> . &Ocy;&ncy; &tcy;&acy;&kcy;&zhcy;&iecy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy; &zcy;&acy;&pcy;&icy;&scy;&icy; &icy;&zcy; .git/shallow, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &ncy;&iecy;&dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy; &ncy;&icy; &dcy;&lcy;&yacy; &ocy;&dcy;&ncy;&ocy;&jcy; &scy;&scy;&ycy;&lcy;&kcy;&icy;.</span></p> <p><span data-i18n="04622ddcc03739b131042fb8c21786416d7b4aed48e26818e147ecf02a2c9912/b4" data-source="Note that unreachable, packed objects will remain. If this is not desired, see &lt;a href=&quot;git-repack&quot;&gt;git-repack[1]&lt;/a&gt;." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &ncy;&iecy;&dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&iecy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy; &ocy;&scy;&tcy;&acy;&ncy;&ucy;&tcy;&scy;&yacy;. &IEcy;&scy;&lcy;&icy; &ecy;&tcy;&ocy; &ncy;&iecy;&zhcy;&iecy;&lcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;, &scy;&mcy;.  <a href="git-repack.html">git-repack[1]</a> .</span></p> </div> <h2 class="text-body-emphasis"  id="_options"><span data-i18n="d0db8b5e364b6989e4b8f38a2b3846b87d99a51c1592ebf35d21cc66405a8e39/b6" data-source="Options" onmousemove="i18n(this)">Options</span></h2> <div> <div> <dl> <dt id="Documentation/git-prune.txt--n"><span data-i18n="5249f4fcc629efa0e6d6b2bf746b6c5de61611ce719ad61ac820fbe5c8cece66/28" data-source="-n" onmousemove="i18n(this)">-n</span></dt> <dt id="Documentation/git-prune.txt---dry-run"><span data-i18n="675ca48430023bf861e914e0cf5bbe183efe84bd9d831affc574394bf4edc690/c1" data-source="--dry-run" onmousemove="i18n(this)">--dry-run</span></dt> <dd> <p><span data-i18n="95c97b6c7101f9f8605d7c3ea3a35a63e99c9f69bda9c264eccf915839aa3d65/17" data-source="Do not remove anything; just report what it would remove." onmousemove="i18n(this)">&Ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy; &ucy;&dcy;&acy;&lcy;&yacy;&jcy;&tcy;&iecy;; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &ocy;&ncy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;.</span></p> </dd> <dt id="Documentation/git-prune.txt--v"><span data-i18n="81c36ccd44ef18baabad6e2d87038b72d606263bd6a3432b964a872023654fff/7c" data-source="-v" onmousemove="i18n(this)">-v</span></dt> <dt id="Documentation/git-prune.txt---verbose"><span data-i18n="bff1e8d3adf9e53481e9b21876983b359dc8a231bf7ebadde36a42dd7bd4db5c/93" data-source="--verbose" onmousemove="i18n(this)">--verbose</span></dt> <dd> <p><span data-i18n="910e280cbcbd99b6f9aa4ac535a2b9edfe2a1749003f246605ba7770eb071371/eb" data-source="Report all removed objects." onmousemove="i18n(this)">&Scy;&ocy;&ocy;&bcy;&shchcy;&acy;&jcy;&tcy;&iecy; &ocy;&bcy;&ocy; &vcy;&scy;&iecy;&khcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;&khcy;.</span></p> </dd> <dt id="Documentation/git-prune.txt---progress"><span data-i18n="c4d85ead394fc39f65f473a99058ad8fe951b5cd8d8dacc9e82d90e36b6430ea/a2" data-source="--progress" onmousemove="i18n(this)">--progress</span></dt> <dd> <p><span data-i18n="9d7625763fe93a84d3faec156669a0f5f42d3c0bc0cd3a711aabc12f4c717bca/7d" data-source="Show progress." onmousemove="i18n(this)">Show progress.</span></p> </dd> <dt id="Documentation/git-prune.txt---expirelttimegt"><span data-i18n="046a4582263c1718caa61262eeb90075285134863852db90e0409e9ea04fe7b0/b1" data-source="--expire &amp;lt;time&amp;gt;" onmousemove="i18n(this)">--expire &lt;time&gt;</span></dt> <dd> <p><span data-i18n="ec215c176477231d27ca3a7efd0c6051721509a68607d5ec4c5dc68f88b31538/ef" data-source="Only expire loose objects older than &amp;lt;time&amp;gt;." onmousemove="i18n(this)">&Scy;&rcy;&ocy;&kcy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&yacy; &icy;&scy;&tcy;&iecy;&kcy;&acy;&iecy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ucy; &ncy;&iecy;&zcy;&acy;&kcy;&rcy;&iecy;&pcy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &scy;&tcy;&acy;&rcy;&shcy;&iecy; &lt;time&gt;.</span></p> </dd> <dt id="Documentation/git-prune.txt---"><span data-i18n="d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c/71" data-source="--" onmousemove="i18n(this)">--</span></dt> <dd> <p><span data-i18n="0ea53dd4a1fb9384edae11ed9c03b5411457806a0ae358d444eb80e48fbc0c0c/07" data-source="Do not interpret any more arguments as options." onmousemove="i18n(this)">&Ncy;&iecy; &icy;&ncy;&tcy;&iecy;&rcy;&pcy;&rcy;&iecy;&tcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&iecy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ycy; &kcy;&acy;&kcy; &vcy;&acy;&rcy;&icy;&acy;&ncy;&tcy;&ycy;.</span></p> </dd> <dt id="Documentation/git-prune.txt-ltheadgt82308203"><span data-i18n="59e5f412ffcbde9b8b1d60b9268052f825ecf82f9900eda94b5e5534c54af199/16" data-source="&amp;lt;head&amp;gt;&amp;hellip;" onmousemove="i18n(this)">&lt;head&gt;&hellip;</span></dt> <dd> <p><span data-i18n="e4e3eadc184de4a8916f18b6d79e82eac468d94c5ba8c64f04779a01fde2a375/2e" data-source="In addition to objects reachable from any of our references, keep objects reachable from listed &amp;lt;head&amp;gt;s." onmousemove="i18n(this)">&Vcy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&iecy; &kcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;&mcy;, &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&mcy; &pcy;&ocy; &lcy;&yucy;&bcy;&ocy;&jcy; &icy;&zcy; &ncy;&acy;&shcy;&icy;&khcy; &scy;&scy;&ycy;&lcy;&ocy;&kcy;, &ocy;&scy;&tcy;&acy;&vcy;&softcy;&tcy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&mcy;&icy; &icy;&zcy; &pcy;&iecy;&rcy;&iecy;&chcy;&icy;&scy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &lt;head&gt;.</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_examples"><span data-i18n="e68ee04dff59551b7d1ae07a2f8a00dc61d841628948da3d2781630706a05e92/38" data-source="Examples" onmousemove="i18n(this)">Examples</span></h2> <div> <p><span data-i18n="7ed8b1287eaca089a147a74f339aff89ee977d05590352639cc91f245b43b975/15" data-source="To prune objects not used by your repository or another that borrows from your repository via its &lt;code&gt;.git/objects/info/alternates&lt;/code&gt;:" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;, &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&iecy; &vcy;&acy;&shcy;&icy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&mcy; &icy;&lcy;&icy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &zcy;&acy;&icy;&mcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &chcy;&iecy;&rcy;&iecy;&zcy; &iecy;&gcy;&ocy;  <code>.git/objects/info/alternates</code> :</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git prune $(<span class="hljs-built_in">cd</span> ../another &amp;&amp; git rev-parse --all)</span></pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_notes"><span data-i18n="8a7525b1492fb84833f5c4a69b30f4bfbb134f9b666b61a2c1872d63d234c085/bb" data-source="Notes" onmousemove="i18n(this)">Notes</span></h2> <div> <p><span data-i18n="b626ad560cfb0106a2af351d38d264025df267875688282fd2e19192c81fca41/53" data-source="In most cases, users will not need to call &lt;code&gt;git prune&lt;/code&gt; directly, but should instead call &lt;code&gt;git gc&lt;/code&gt;, which handles pruning along with many other housekeeping tasks." onmousemove="i18n(this)">&Vcy; &bcy;&ocy;&lcy;&softcy;&shcy;&icy;&ncy;&scy;&tcy;&vcy;&iecy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;&vcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&yacy;&mcy; &ncy;&iecy; &ncy;&ucy;&zhcy;&ncy;&ocy; &bcy;&ucy;&dcy;&iecy;&tcy; &ncy;&acy;&pcy;&rcy;&yacy;&mcy;&ucy;&yucy; &vcy;&ycy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy;  <code>git prune</code> , &acy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &vcy;&ycy;&zcy;&vcy;&acy;&tcy;&softcy;  <code>git gc</code>  , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&iecy;&tcy; &ocy;&bcy;&rcy;&iecy;&zcy;&kcy;&ucy; &ncy;&acy;&rcy;&yacy;&dcy;&ucy; &scy;&ocy; &mcy;&ncy;&ocy;&gcy;&icy;&mcy;&icy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ucy;&zhcy;&iecy;&bcy;&ncy;&ycy;&mcy;&icy; &zcy;&acy;&dcy;&acy;&chcy;&acy;&mcy;&icy;.</span></p> <p><span data-i18n="b8cbedd4cea88222fc2fcebaf31e1b84ac87c00680af750e7ed0d643c1bb4f6d/97" data-source="For a description of which objects are considered for pruning, see &lt;code&gt;git fsck&lt;/code&gt;&amp;apos;s --unreachable option." onmousemove="i18n(this)">&Ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;, &pcy;&ocy;&dcy;&lcy;&iecy;&zhcy;&acy;&shchcy;&icy;&khcy; &scy;&ocy;&kcy;&rcy;&acy;&shchcy;&iecy;&ncy;&icy;&yucy;, &scy;&mcy;. &vcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&iecy; --unreachable  <code>git fsck</code> .</span></p> </div> <h2 class="text-body-emphasis"  id="_see_also"><span data-i18n="2fa97693b70fa87b95b2d1bdf9558e4ac65d5e82d145f13a03849c4d9c4957a9/40" data-source="See also" onmousemove="i18n(this)">See also</span></h2> <div> <p><span data-i18n="a309dd8e213e83a958f472e7ce47c0c3f2983fb8724e00423f35f0c1f00dddb9/f8" data-source="&lt;a href=&quot;git-fsck&quot;&gt;git-fsck[1]&lt;/a&gt;, &lt;a href=&quot;git-gc&quot;&gt;git-gc[1]&lt;/a&gt;, &lt;a href=&quot;git-reflog&quot;&gt;git-reflog[1]&lt;/a&gt;" onmousemove="i18n(this)"><a href="git-fsck.html">git-fsck[1]</a> ,  <a href="git-gc.html">git-gc[1]</a> ,  <a href="git-reflog.html">git-reflog[1]</a></span></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/git-prune">https://git-scm.com/docs/git-prune</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                            <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-prune-packed.html">
                            git prune-packed                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-pull.html">
                            git pull                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-push.html">
                            git push                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-quiltimport.html">
                            git quiltimport                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-range-diff.html">
                            git range-diff                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-read-tree.html">
                            git read-tree                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-rebase.html">
                            git rebase                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                   <ins class="adsbygoogle"
        style="display:block; text-align:center;"
        data-ad-layout="in-article"
        data-ad-format="fluid"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="3777011170"></ins>
<script>
    (adsbygoogle = window.adsbygoogle || []).push({});
</script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="git-prune.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>